package com.ymk.service.impl;

import com.ymk.base.mybatis.DaoRouter;
import com.ymk.base.mybatis.Pagination;
import com.ymk.bo.work.WorkApplyBO;
import com.ymk.service.IWorkApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 地区招商表 服务实现类
 * </p>
 *
 * @author 莫参商
 * @since 2023-08-15
 */
@Service
public class WorkApplyService implements IWorkApplyService {

    @Override
    public WorkApplyBO get(Map param) {
    return this.daoRouter.queryForObject("WorkApply.loadWorkApply",param);
    }

    @Override
    public List<WorkApplyBO> list(Map param) {
        return this.daoRouter.query("WorkApply.loadWorkApply",param);
    }

    @Override
    public List<WorkApplyBO> listForPage(Pagination pagination) {
        return this.daoRouter.query("WorkApply.loadWorkApplyForPage",pagination);
    }

    @Override
    public void post(WorkApplyBO param) {
        this.daoRouter.insert("AWorkApply.insertWorkApply",param);
    }

    @Override
    public void update(WorkApplyBO param) {
        this.daoRouter.update("AWorkApply.updateWorkApply",param);
    }

    @Override
    public void del(WorkApplyBO param) {
        this.daoRouter.update("AWorkApply.delWorkApply",param);
    }

    @Autowired
    private DaoRouter daoRouter;

}
